package com.sanpu.kxe.business.trade.adapter;

import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.sanpu.kxe.business.trade.fragment.RebTotalFragment;

import java.util.ArrayList;

/**
 * Description：我的返佣
 * Created by 薛勇军 on 2018/8/8.
 */

public class MyRebTotalAdapter extends FragmentPagerAdapter {

    ArrayList<RebTotalFragment> fragments = new ArrayList<>();

    public MyRebTotalAdapter(FragmentManager fm, boolean isPartner) {
        super(fm);
        if (isPartner) {
            fragments.add(RebTotalFragment.getInstance("PART"));
        } else {
            fragments.add(RebTotalFragment.getInstance("FIRST"));
        }
    }

    @Override
    public RebTotalFragment getItem(int position) {
        return fragments.get(position);
    }

    @Override
    public int getCount() {
        return fragments.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return "";
    }
}
